3.790 \(\int \frac {\sin (c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx\)

Optimal. Leaf size=88 \[ -\frac {4 \tan ^7(c+d x)}{7 a^3 d}-\frac {3 \tan ^5(c+d x)}{5 a^3 d}+\frac {4 \sec ^7(c+d x)}{7 a^3 d}-\frac {7 \sec ^5(c+d x)}{5 a^3 d}+\frac {\sec ^3(c+d x)}{a^3 d} \]

[Out]

sec(d*x+c)^3/a^3/d-7/5*sec(d*x+c)^5/a^3/d+4/7*sec(d*x+c)^7/a^3/d-3/5*tan(d*x+c)^5/a^3/d-4/7*tan(d*x+c)^7/a^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.31, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2875, 2873, 2606, 14, 2607, 270, 30} \[ -\frac {4 \tan ^7(c+d x)}{7 a^3 d}-\frac {3 \tan ^5(c+d x)}{5 a^3 d}+\frac {4 \sec ^7(c+d x)}{7 a^3 d}-\frac {7 \sec ^5(c+d x)}{5 a^3 d}+\frac {\sec ^3(c+d x)}{a^3 d} \]

Antiderivative was successfully verified.

[In]

Int[(Sin[c + d*x]*Tan[c + d*x]^2)/(a + a*Sin[c + d*x])^3,x]

[Out]

Sec[c + d*x]^3/(a^3*d) - (7*Sec[c + d*x]^5)/(5*a^3*d) + (4*Sec[c + d*x]^7)/(7*a^3*d) - (3*Tan[c + d*x]^5)/(5*a
^3*d) - (4*Tan[c + d*x]^7)/(7*a^3*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2873

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 2875

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Dist[(a/g)^(2*m), Int[((g*Cos[e + f*x])^(2*m + p)*(d*Sin[e + f*x])^n)/(a - b*Sin[e +
 f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {\sin (c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx &=\frac {\int \sec ^5(c+d x) (a-a \sin (c+d x))^3 \tan ^3(c+d x) \, dx}{a^6}\\ &=\frac {\int \left (a^3 \sec ^5(c+d x) \tan ^3(c+d x)-3 a^3 \sec ^4(c+d x) \tan ^4(c+d x)+3 a^3 \sec ^3(c+d x) \tan ^5(c+d x)-a^3 \sec ^2(c+d x) \tan ^6(c+d x)\right ) \, dx}{a^6}\\ &=\frac {\int \sec ^5(c+d x) \tan ^3(c+d x) \, dx}{a^3}-\frac {\int \sec ^2(c+d x) \tan ^6(c+d x) \, dx}{a^3}-\frac {3 \int \sec ^4(c+d x) \tan ^4(c+d x) \, dx}{a^3}+\frac {3 \int \sec ^3(c+d x) \tan ^5(c+d x) \, dx}{a^3}\\ &=-\frac {\operatorname {Subst}\left (\int x^6 \, dx,x,\tan (c+d x)\right )}{a^3 d}+\frac {\operatorname {Subst}\left (\int x^4 \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{a^3 d}+\frac {3 \operatorname {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\sec (c+d x)\right )}{a^3 d}-\frac {3 \operatorname {Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,\tan (c+d x)\right )}{a^3 d}\\ &=-\frac {\tan ^7(c+d x)}{7 a^3 d}+\frac {\operatorname {Subst}\left (\int \left (-x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^3 d}+\frac {3 \operatorname {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^3 d}-\frac {3 \operatorname {Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,\tan (c+d x)\right )}{a^3 d}\\ &=\frac {\sec ^3(c+d x)}{a^3 d}-\frac {7 \sec ^5(c+d x)}{5 a^3 d}+\frac {4 \sec ^7(c+d x)}{7 a^3 d}-\frac {3 \tan ^5(c+d x)}{5 a^3 d}-\frac {4 \tan ^7(c+d x)}{7 a^3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.38, size = 104, normalized size = 1.18 \[ \frac {\sec (c+d x) (1008 \sin (c+d x)-602 \sin (2 (c+d x))+48 \sin (3 (c+d x))+43 \sin (4 (c+d x))-602 \cos (c+d x)-448 \cos (2 (c+d x))+258 \cos (3 (c+d x))-8 \cos (4 (c+d x))+840)}{2240 a^3 d (\sin (c+d x)+1)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sin[c + d*x]*Tan[c + d*x]^2)/(a + a*Sin[c + d*x])^3,x]

[Out]

(Sec[c + d*x]*(840 - 602*Cos[c + d*x] - 448*Cos[2*(c + d*x)] + 258*Cos[3*(c + d*x)] - 8*Cos[4*(c + d*x)] + 100
8*Sin[c + d*x] - 602*Sin[2*(c + d*x)] + 48*Sin[3*(c + d*x)] + 43*Sin[4*(c + d*x)]))/(2240*a^3*d*(1 + Sin[c + d
*x])^3)

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 102, normalized size = 1.16 \[ \frac {\cos \left (d x + c\right )^{4} + 13 \, \cos \left (d x + c\right )^{2} - 3 \, {\left (\cos \left (d x + c\right )^{2} + 5\right )} \sin \left (d x + c\right ) - 20}{35 \, {\left (3 \, a^{3} d \cos \left (d x + c\right )^{3} - 4 \, a^{3} d \cos \left (d x + c\right ) + {\left (a^{3} d \cos \left (d x + c\right )^{3} - 4 \, a^{3} d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*sin(d*x+c)^3/(a+a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/35*(cos(d*x + c)^4 + 13*cos(d*x + c)^2 - 3*(cos(d*x + c)^2 + 5)*sin(d*x + c) - 20)/(3*a^3*d*cos(d*x + c)^3 -
 4*a^3*d*cos(d*x + c) + (a^3*d*cos(d*x + c)^3 - 4*a^3*d*cos(d*x + c))*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.25, size = 120, normalized size = 1.36 \[ -\frac {\frac {35}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} - \frac {35 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 280 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1015 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 1120 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1001 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 392 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 61}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{7}}}{280 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*sin(d*x+c)^3/(a+a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-1/280*(35/(a^3*(tan(1/2*d*x + 1/2*c) - 1)) - (35*tan(1/2*d*x + 1/2*c)^6 + 280*tan(1/2*d*x + 1/2*c)^5 + 1015*t
an(1/2*d*x + 1/2*c)^4 + 1120*tan(1/2*d*x + 1/2*c)^3 + 1001*tan(1/2*d*x + 1/2*c)^2 + 392*tan(1/2*d*x + 1/2*c) +
 61)/(a^3*(tan(1/2*d*x + 1/2*c) + 1)^7))/d

________________________________________________________________________________________

maple [A]  time = 0.49, size = 130, normalized size = 1.48 \[ \frac {-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {8}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}-\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {26}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {3}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {16}{128 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+128}}{d \,a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^2*sin(d*x+c)^3/(a+a*sin(d*x+c))^3,x)

[Out]

16/d/a^3*(-1/128/(tan(1/2*d*x+1/2*c)-1)+1/14/(tan(1/2*d*x+1/2*c)+1)^7-1/4/(tan(1/2*d*x+1/2*c)+1)^6+13/40/(tan(
1/2*d*x+1/2*c)+1)^5-3/16/(tan(1/2*d*x+1/2*c)+1)^4+1/32/(tan(1/2*d*x+1/2*c)+1)^3+1/64/(tan(1/2*d*x+1/2*c)+1)^2+
1/128/(tan(1/2*d*x+1/2*c)+1))

________________________________________________________________________________________

maxima [B]  time = 0.34, size = 250, normalized size = 2.84 \[ \frac {4 \, {\left (\frac {18 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {42 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {42 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {35 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + 3\right )}}{35 \, {\left (a^{3} + \frac {6 \, a^{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {14 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {14 \, a^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 \, a^{3} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {14 \, a^{3} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {6 \, a^{3} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {a^{3} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*sin(d*x+c)^3/(a+a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

4/35*(18*sin(d*x + c)/(cos(d*x + c) + 1) + 42*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 42*sin(d*x + c)^3/(cos(d*x
 + c) + 1)^3 + 35*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 3)/((a^3 + 6*a^3*sin(d*x + c)/(cos(d*x + c) + 1) + 14*
a^3*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 14*a^3*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 14*a^3*sin(d*x + c)^5/(
cos(d*x + c) + 1)^5 - 14*a^3*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 6*a^3*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 -
 a^3*sin(d*x + c)^8/(cos(d*x + c) + 1)^8)*d)

________________________________________________________________________________________

mupad [B]  time = 9.73, size = 158, normalized size = 1.80 \[ \frac {4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (3\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+18\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+42\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+42\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+35\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\right )}{35\,a^3\,d\,\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^7} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^3/(cos(c + d*x)^2*(a + a*sin(c + d*x))^3),x)

[Out]

(4*cos(c/2 + (d*x)/2)^4*(3*cos(c/2 + (d*x)/2)^4 + 35*sin(c/2 + (d*x)/2)^4 + 42*cos(c/2 + (d*x)/2)*sin(c/2 + (d
*x)/2)^3 + 18*cos(c/2 + (d*x)/2)^3*sin(c/2 + (d*x)/2) + 42*cos(c/2 + (d*x)/2)^2*sin(c/2 + (d*x)/2)^2))/(35*a^3
*d*(cos(c/2 + (d*x)/2) - sin(c/2 + (d*x)/2))*(cos(c/2 + (d*x)/2) + sin(c/2 + (d*x)/2))^7)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**2*sin(d*x+c)**3/(a+a*sin(d*x+c))**3,x)

[Out]

Timed out

________________________________________________________________________________________